#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.57)
AC_INIT(htmlreplib, 1.0, puninj@cs.rpi.edu)
AC_CONFIG_SRCDIR([src/GR_write_html.c])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE

AC_ARG_WITH(graphpack,
	[--with-graphpack=<path> prefix of graphpack header directory],
	[GRAPHPACK=$with_graphpack],
	[
	if test "$GRAPHPACK" = ""; then AC_MSG_ERROR([this script must be called with --with-graphpack=<path>])
	else GRAPHPACK="$GRAPHPACK"
	fi ])
	AC_SUBST(GRAPHPACK)

AC_ARG_WITH(weblog,
	[--with-weblog=<path> prefix of weblog header directory],
	[WEBLOG=$with_weblog],
	[ if test "$WEBLOG" = ""; then AC_MSG_ERROR([this script must be called with --with-weblog=<path>])
	else WEBLOG="$WEBLOG"
	fi ])
	AC_SUBST(WEBLOG)

# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB

# Checks for libraries.

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h string.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

# Checks for library functions.
AC_CHECK_FUNCS([getcwd strchr strncasecmp strstr])


AC_CONFIG_FILES([Makefile
	src/Makefile])
AC_OUTPUT
